﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Scheduling.Models
{
    /// <summary>
    /// The model of a user in the system. A user is a person who have
    /// access to additional parts of the system (beyond basic viewing). 
    /// </summary>
    public class User
    {
        /// <summary>
        /// The ID of the user; In our case, the Initials such as MBl. 
        /// </summary>
        public string ID { get; set; }

        /// <summary>
        /// The Group of the user; Not loaded by default. 
        /// </summary>
        public UserGroup UserGroup { get; set; }

        /// <summary>
        /// The Firstname of the user. 
        /// </summary>
        public string FirstName { get; set; }

        /// <summary>
        /// The Lastname of the user. 
        /// </summary>
        public string LastName { get; set; }

        /// <summary>
        /// The Password of the user, encrypted with SHA1(email+salt). 
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// The Email of the user. 
        /// </summary>
        public string Email { get; set; }

        /// <summary>
        /// The Phone number of the user. 
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// The Department of the user. 
        /// </summary>
        public Department Department { get; set; }

        public override string ToString()
        {
            return ID;
        }
    }
}